package global;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/5/23 11:17
 * Version:1.0-SNAPSHOT
 * Description:
 */
@ControllerAdvice
public class GlobalException {

    @ExceptionHandler
    public ModelAndView exceptionHandler(Exception e){
        e.printStackTrace();
        return new ModelAndView("globalException","msg","服务器内部异常");
    }

}
